<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
		<title>Board Game Platform</title>
		<link rel="stylesheet" type="text/css" href="style.css" />
		<!--[if IE]>
		<link rel="stylesheet" type="text/css" href="ie.css" />
		<![endif]-->
		 <script language="javascript" src="/bgp/bgp.nocache.js"></script>
		 <script>
		 var bgpGameLinker ={};
		 bgpGameLinker.ufkList = [];
		 bgpGameLinker.addJavascript = function(jsname,pos) {
		 	var th = document.getElementsByTagName(pos)[0];
		 	var s = document.createElement('script');	
		 	s.setAttribute('type','text/javascript');
		 	s.setAttribute('src',jsname);
		 	th.appendChild(s);
		 }

		 bgpGameLinker.load = function(moduleName)
		 {
		 	var path = moduleName + "/" + moduleName + ".nocache.js";

		 	
		 	var $wnd_0 = window, $doc_0 = document, $stats = $wnd_0.__gwtStatsEvent?function(a){
		     return $wnd_0.__gwtStatsEvent(a);
		   }
		   :null, gwtOnLoad, bodyDone, base = '', metaProps = {}, values = [], providers = [], answers = [], onLoadErrorFunc, propertyErrorFunc;
		   $stats && $stats({moduleName:moduleName, sessionId:$sessionId, subSystem:'startup', evtGroup:'bootstrap', millis:(new Date).getTime(), type:'begin'});
		   if (!$wnd_0.__gwt_stylesLoaded) {
		     $wnd_0.__gwt_stylesLoaded = {};
		   }
		   if (!$wnd_0.__gwt_scriptsLoaded) {
		     $wnd_0.__gwt_scriptsLoaded = {};
		   }
		   function isHostedMode(){
		     try {
		       return $wnd_0.external && ($wnd_0.external.gwtOnLoad && $wnd_0.location.search.indexOf('gwt.hybrid') == -1);
		     }
		      catch (e) {
		       return false;
		     }
		   }

		   function maybeStartModule(){
		     if (gwtOnLoad && bodyDone) {
		       gwtOnLoad(onLoadErrorFunc, moduleName, base);
		       $stats && $stats({moduleName:moduleName, sessionId:$sessionId, subSystem:'startup', evtGroup:'moduleStartup', millis:(new Date).getTime(), type:'end'});
		     }
		   }

		   function computeScriptBase(){
		    base = "http://" + window.location.host +"/resources/" + moduleName +"/";

		   }

		   function processMetas(){
		     var metas = document.getElementsByTagName('meta');
		     for (var i = 0, n = metas.length; i < n; ++i) {
		       var meta = metas[i], name_0 = meta.getAttribute('name'), content;
		       if (name_0) {
		         if (name_0 == 'gwt:property') {
		           content = meta.getAttribute('content');
		           if (content) {
		             var value, eq = content.indexOf('=');
		             if (eq >= 0) {
		               name_0 = content.substring(0, eq);
		               value = content.substring(eq + 1);
		             }
		              else {
		               name_0 = content;
		               value = '';
		             }
		             metaProps[name_0] = value;
		           }
		         }
		          else if (name_0 == 'gwt:onPropertyErrorFn') {
		           content = meta.getAttribute('content');
		           if (content) {
		             try {
		               propertyErrorFunc = eval(content);
		             }
		              catch (e) {
		               alert('Bad handler "' + content + '" for "gwt:onPropertyErrorFn"');
		             }
		           }
		         }
		          else if (name_0 == 'gwt:onLoadErrorFn') {
		           content = meta.getAttribute('content');
		           if (content) {
		             try {
		               onLoadErrorFunc = eval(content);
		             }
		              catch (e) {
		               alert('Bad handler "' + content + '" for "gwt:onLoadErrorFn"');
		             }
		           }
		         }
		       }
		     }
		   }

		   function unflattenKeylistIntoAnswers(propValArray, value){
		     var answer = answers;
		     for (var i = 0, n = propValArray.length - 1; i < n; ++i) {
		       answer = answer[propValArray[i]] || (answer[propValArray[i]] = []);
		     }
		     answer[propValArray[n]] = value;
		   }

		   function computePropValue(propName){
		     var value = providers[propName](), allowedValuesMap = values[propName];
		     if (value in allowedValuesMap) {
		       return value;
		     }
		     var allowedValuesList = [];
		     for (var k in allowedValuesMap) {
		       allowedValuesList[allowedValuesMap[k]] = k;
		     }
		     if (propertyErrorFunc) {
		       propertyErrorFunc(propName, allowedValuesList, value);
		     }
		     throw null;
		   }

		   providers['user.agent'] = function(){
		     var ua = navigator.userAgent.toLowerCase();
		     var makeVersion = function(result){
		       return parseInt(result[1]) * 1000 + parseInt(result[2]);
		     }
		     ;
		     if (ua.indexOf('opera') != -1) {
		       return 'opera';
		     }
		      else if (ua.indexOf('webkit') != -1) {
		       return 'safari';
		     }
		      else if (ua.indexOf('msie') != -1) {
		       if (document.documentMode >= 8) {
		         return 'ie8';
		       }
		        else {
		         var result_0 = /msie ([0-9]+)\.([0-9]+)/.exec(ua);
		         if (result_0 && result_0.length == 3) {
		           var v = makeVersion(result_0);
		           if (v >= 6000) {
		             return 'ie6';
		           }
		         }
		       }
		     }
		      else if (ua.indexOf('gecko') != -1) {
		       var result_0 = /rv:([0-9]+)\.([0-9]+)/.exec(ua);
		       if (result_0 && result_0.length == 3) {
		         if (makeVersion(result_0) >= 1008)
		           return 'gecko1_8';
		       }
		       return 'gecko';
		     }
		     return 'unknown';
		   };

		   values['user.agent'] = {gecko:0, gecko1_8:1, ie6:2, ie8:3, opera:4, safari:5};
		   bgpGameLinker.load.onScriptLoad = function(gwtOnLoadFunc){
		    //bgp = null;
		     gwtOnLoad = gwtOnLoadFunc;
		     maybeStartModule();
		   };
		   
		   if (isHostedMode()) {
		     alert('Cross-site hosted mode not yet implemented. See issue ' + 'http://code.google.com/p/google-web-toolkit/issues/detail?id=2079');
		     return;
		   }

		   computeScriptBase();

		   processMetas();

		   $stats && $stats({moduleName:moduelName, sessionId:$sessionId, subSystem:'startup', evtGroup:'bootstrap', millis:(new Date).getTime(), type:'selectingPermutation'});
		   var strongName;

		   try {
		 	for(var i = 0; i < bgpGameLinker.ufkList.length; i++)
		 	{
		 		unflattenKeylistIntoAnswers(bgpGameLinker.ufkList[i].userAgent,bgpGameLinker.ufkList[i].strongname);
		 	}

		     strongName = answers[computePropValue('user.agent')];
		   }
		    catch (e) {
		     return;
		   }

		   var onBodyDoneTimerId;
		   function onBodyDone(){
		     if (!bodyDone) {
		       bodyDone = true;
		       maybeStartModule();
		       if ($doc_0.removeEventListener) {
		         $doc_0.removeEventListener('DOMContentLoaded', onBodyDone, false);
		       }
		       if (onBodyDoneTimerId) {
		         clearInterval(onBodyDoneTimerId);
		       }
		     }
		   }

		   if ($doc_0.addEventListener) {
		     $doc_0.addEventListener('DOMContentLoaded', function(){
		       onBodyDone();
		     }
		     , false);
		   }
		   var onBodyDoneTimerId = setInterval(function(){
		     if (/loaded|complete/.test($doc_0.readyState)) {
		       onBodyDone();
		     }
		   }
		   , 50);


		 	function addJavascript(jsname,pos) {
		 		var th = $doc_0.getElementsByTagName(pos)[0];
		 		var s = document.createElement('script');	
		 		s.setAttribute('type','text/javascript');
		 		s.setAttribute('src',jsname);
		 		th.appendChild(s);
		 	}

		   $stats && $stats({moduleName:moduleName, sessionId:$sessionId, subSystem:'startup', evtGroup:'bootstrap', millis:(new Date).getTime(), type:'end'});
		   $stats && $stats({moduleName:moduleName, sessionId:$sessionId, subSystem:'startup', evtGroup:'loadExternalRefs', millis:(new Date).getTime(), type:'begin'});

		   bgpGameLinker.addJavascript( base + strongName + '.cache.js','head');
		 }
		 </script>
	</head>
	<body>
		<div id="container">
			<div id="header">
				<h1>Board Game Platform</h1>
				<div id="header_menu">
					<ul>
						<li>Logout</li>
					</ul>
				</div>
				<div class="clear"></div>
			</div>

			<div id="content_box">
				<div id="sidebar">
					<ul>
						<li><a href="#">My Account</a></li>
						<li><a href="game-types.html">View Game Types</a></li>
						<li><a href="view-scores.html">View Scores</a></li>
						<li id="adminButton"></li>
					</ul>
				</div>
				<div id="content">
					<h2 class="contentTitle">Game types</h2>
					<p>Select a game type from the list of available game types.</p>
					<div id="gameTypeTable"></div>
					<div id="actionButtons" class="alignRight">
						<div id="startButton"></div>
					</div>
				</div>
				<div class="clear"></div>
			</div>
		<!-- 	<div id="playArea">
				<script language="javascript" src="/resources/tictactoe/tictactoe.nocache.js"></script>
			</div> -->
			<div id="footer">
				Board Game Platform &copy; 2010
			</div>
		</div>
	</body>
</html>